package org.web.hello.dubbomarket.server.biz.impl;

import org.apache.dubbo.rpc.RpcContext;
import org.web.base.domain.ResultDO;
import org.web.hello.dubbomarket.sdk.biz.HelloDubboWorld;

public class HelloDubboWorldImpl implements HelloDubboWorld {

    @Override
    public ResultDO<String> sayHello(String name) {
        ResultDO<String> result = new ResultDO<>();
        result.setDomain(name);
        String attributeFromContext = RpcContext.getContext().getAttachment("key_1");
        result.getExtendsDomain().put("key_1", attributeFromContext);
        return result;
    }
}
